package com.baturu.vin.dfpv.dal.dao;

import com.baturu.vin.dfpv.dto.DfpvCarSystemBtrIdDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: chenjiahao
 * @Time: 2018/9/5
 */
public interface DfpvCarTypeDAO {

    @Select({"<script>",
            "SELECT displacement",
            "FROM dfpv_car_type",
            "WHERE model_name like '${carSystem}%'",
            "AND engine_code like '${engine}%'",
            "AND transmission_code in ",
            "<foreach item = 'item' index = 'index' collection = 'transmissionType' open = '(' separator = ',' close = ')'>",
            "#{item}",
            "</foreach>",
            "</script>"
    })
    List<DfpvCarSystemBtrIdDTO> queryDisplacementByVinResult(@Param("carSystem") String carSystem, @Param("engine") String engine, @Param("transmissionType") List<String> transmissionType);
}
